package priv.dajie.tzzq.bot.model;

import java.util.ArrayList;
import java.util.HashMap;

public class PackItems extends ArrayList<PackItem> {

    private HashMap<String, PackItem> map = null;

    public synchronized HashMap<String, PackItem> getMap(){
        if(map == null){
            map = new HashMap<>();
            for(PackItem packItem : this){
                map.putIfAbsent(packItem.getSteamName(), packItem);
            }
        }
        return map;
    }

}
